import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import scan.pojo.Person;
import scan.pojo.Person2;

@ComponentScan("scan.*")
public class ConfigurationBeanMain {
    public static void main(String args[])
    {
        AnnotationConfigApplicationContext ac = new AnnotationConfigApplicationContext(ConfigurationBeanMain.class);
        Person person = (Person) ac.getBean("person");
        person.sayHello();
    }
}
